package com.grailslm

import org.apache.ibatis.annotations.Delete
import org.apache.ibatis.annotations.Insert
import org.apache.ibatis.annotations.Select
import org.apache.ibatis.annotations.Update

interface UserMapper{

    ArrayList<User> demo()

    @Select("SELECT * FROM user")
    ArrayList<User> list()

    @Select("select * from user where id = #{id}")
    User get(def id)

    Boolean save(def params) //@Insert

    Boolean update(def params) //@Update

    @Delete("delete from user where id = #{id}")
    Boolean delete(def id)

}